Assignemnt #project 1 and 50th program

Code

///Name: Derrick Andreasen
///Period: 7
///Program name: project # 1
///File name: 50Prog.java
///Date Finished:10/30/2015

import java.util.Scanner;

public class FiftProg
{
	public static void main( String[] args )
	{
        Scanner keyboard = new Scanner(System.in);
        
        String answer, floor_1, floor_2, basement, answer_2, office, shop, answer_3, answer_4, answer_5, answer_6, deconstruction, creation, answer_7, left_door, right_door, hallway, answer_8, gas_room, answer_9, recreation,cafeteria, answer_10, answer_11, red_room, blue_room, answer_12,answer_13, flower_feild, answer_14, cloud_house, kitchen, upstairs, answer_15,answer_16,answer_17,butcher_shop, blue_door2;
        
         System.out.println( "Welcome to Derrick's Tiny Adventure!" );
         System.out.println( "" );
        
         System.out.println( "You wake up in an elevator. You look around and see" );
         System.out.println( "that there is no way out. Your next thought is to" );
         System.out.println( "press one of the three buttons near the door and" );
         System.out.println( "see if they take you to a new floor and open the" );
         System.out.println( "door. There are only three buttons, floor \"1\"," );
         System.out.println( "floor \"2\", and the \"basement\", which do you" );
         System.out.print( "press? " );
         answer = keyboard.next();
        
         if(answer.equals("1"))
         {
             System.out.println( "" );
             System.out.println( "You decide to press the floor 1 button. you" );
             System.out.println( "feel the elevator moving down. The door opens" );
             System.out.println( "and you enter the new room. It appears to be" );
             System.out.println( "a lobby. You feel uneasy about the building" );
             System.out.println( "you're in. You look around the room and see" );
             System.out.println( "two doors. They both have signs above them" );
             System.out.println( "Stating where they lead. Do you go behind the" );
             System.out.println( "desk to the \"office\", or the door to the left" );
             System.out.print( "labeled \"shop\"? " );
             answer_2 = keyboard.next();
            
             if(answer_2.equals("office"))
             {
                 System.out.println( "" );
                 System.out.println( "You enter the office. There is a corpse" );
                 System.out.println( "in a chair that is behind a desk. The" );
                 System.out.println( "desk has a laptop on it. Do you examine" );
                 System.out.print( "what is on the laptop, \"yes\", or \"no\"? " );
                 answer_3 = keyboard.next();
                
                 if(answer_3.equals("yes"))
                 {
                     System.out.println( "" );
                     System.out.println( "You look at the laptop screen and see" );
                     System.out.println( "a strange optical illusion. When you" );
                     System.out.println( "look back up you see a ghost. the ghost" );
                     System.out.println( "scares you literally to death." );
                     System.out.println( "" );
                     System.out.println( "YOU DIE! " );
                 }
                 else if(answer_3.equals("no"))
                 {
                     System.out.println( "" );
                     System.out.println( "You decide not to look at the computer's" );
                     System.out.println( "contents. You decide instead to take a" );
                     System.out.println( "quick nap. sadly, you never wake up." );
                     System.out.println( "" );
                     System.out.println( "YOU DIED!" );
                 }
                 
             }
             else if(answer_2.equals("shop"))
             {
                 System.out.println( "" );
                 System.out.println( "You made the decision to enter the shop." );
                 System.out.println( "You see a man on a carpet. He looks tired." );
                 System.out.println( "Do you talk to him? " );
                 answer_4 = keyboard.next();
                
                 if(answer_4.equals("yes"))
                 {
                     System.out.println( "" );
                     System.out.println( "You decide to talk to the man. He" );
                     System.out.println( "tells you about a secret passage in" );
                     System.out.println( "the lobby. You go there and open the" );
                     System.out.println( "door. You see that there really is a" );
                     System.out.print( "passage. Do you enter the passage? " );
                     answer_5 = keyboard.next();
                    
                     if(answer_5.equals("yes"))
                     {
                         System.out.println( "" );
                         System.out.println( "You enter the secret passage. You" );
                         System.out.println( "walk for about an hour and get to two doors." );
                         System.out.println( "Do you go into the room labled, \"deconstruction\"," );
                         System.out.print( "or the room labled, \"creation\"? " );
                         answer_6 = keyboard.next();
                         
                         if(answer_6.equals("creation"))
                         {
                             System.out.println( "" );
                             System.out.println( "You go into the creation room. You see a bunch" );
                             System.out.println( "of lab equipment. Bodies are being moved from" );
                             System.out.println( "machine to machine by a system of ropes and" );
                             System.out.println( "mechanisms. You see two more doors. They are" );
                             System.out.println( "the both unnamed. do you enter to the \"left\"," );
                             System.out.print( "or to the \"right\"? " );
                             answer_7 = keyboard.next();
                             
                             if(answer_7.equals("right"))
                             {
                                 System.out.println( "" );
                                System.out.println( "You enter the door to the right. The door" );
                                 System.out.println( "locks behind you. A chair at the end of" );
                                 System.out.println( "the room spins around and the man from the" );
                                 System.out.println( "shop stares at you. he presses a button and" );
                                 System.out.println( "you fall to your death." );
                                 System.out.println( "" );
                                 System.out.println( "YOU DIED!" );
                             }
                             
                             else if(answer_7.equals("left"))
                             {
                                 System.out.println( "" );
                                 System.out.println( "You enter the door to the left. You are" );
                                 System.out.println( "now in a long hallway. Do you go through" );
                                 System.out.print( "the door at the end of the hallway? " );
                                 answer_8 = keyboard.next();
                                 
                                 if(answer_8.equals("no"))
                                 {
                                     System.out.println( "" );
                                     System.out.println( "You start back the way you came. The" );
                                     System.out.println( "ground breaks beneath you and you fall to your death." );
                                     System.out.println( "" );
                                     System.out.println( "YOU DIED!" );
                                 }
                                 
                                 else if(answer_8.equals("yes"))
                                 {
                                     System.out.println( "" );
                                     System.out.println( "You enter the door. It closes and locks behind you." );
                                     System.out.println( "You look around and see dead bodies. Gas fills the" );
                                     System.out.println( "room." );
                                     System.out.println( "" );
                                     System.out.println( "YOU DIE!" );
                                 }
                             }
                         }
                         
                         else if(answer_6.equals("deconstruction"))
                         {
                             System.out.println( "" );
                             System.out.println( "You enter the deconstruction room. bodies" );
                             System.out.println( "of all sorts are being deconstructed by large" );
                             System.out.println( "machines. You get sick and throw up. You can't" );
                             System.out.println( "bear to witness the gruesome site any longer." );
                             System.out.println( "You pass out and never wake up again." );
                             System.out.println( "" );
                             System.out.println( "YOU DIE!" );
                         }
                     }
                     else if(answer_5.equals("no"))
                          {
                         System.out.println( "" );
                   System.out.println( "You decide not to talk to the man. I guess you'll" );
                   System.out.println( "never know what happens." );
                         System.out.println( "" );
                     System.out.println( "THE END!" );
                 }
                 }
                    
                 else if(answer_4.equals("no"))
                 {
                     System.out.println( "" );
                   System.out.println( "You decide not to talk to the man. I guess you'll" );
                   System.out.println( "never know what happens." );
                     System.out.println( "" );
                     System.out.println( "THE END!" );
                 }
         }
     
 }
        
        else if(answer.equals("2"))
        {
            System.out.println( "" );
            System.out.println( "The elevator doesnt move, the doors just open." );
            System.out.println( "you step out and see that you are in a large" );
            System.out.println( "room. There are large control panels and monitors." );
            System.out.print( "Do you press any buttons? " );
            answer_9 = keyboard.next();
        
            if(answer_9.equals("yes"))
            {
                System.out.println( "" );
                System.out.println( "You press a bunch of random buttons. A siren" );
                System.out.println( "goes off. You hear a computerized voice tell" );
                System.out.println( "you that the building is about to blow up." );
                System.out.println( "After about tqo minutes of running around like" );
                System.out.println( "a bufoon the bomb goes off." );
                System.out.println( "" );
                System.out.println( "YOU DIED!" );
            }
            
            else if(answer_9.equals("no"))
            {
                System.out.println( "" );
                System.out.println( "You decide to go back to the elevator. You step" );
                System.out.println( "inside and the elevator closes and launches to" );
                System.out.println( "space!" );
                System.out.println( "" );
                System.out.println( "YOU DIE! I think." );
            }
        }
        
        else if(answer.equals("basement"))
        {
            System.out.println( "" );
            System.out.println( "The elevator takes you down to the basement." );
            System.out.println( "When the doors open you look around and feel a" );
            System.out.println( "chill run down your spine. The new area is" );
            System.out.println( "covered in blood but you walk around anyways." );
            System.out.println( "You see two doors. One leads to the \"recreation\"" );
            System.out.println( "room and the other leads to the \"cafeteria\"." );
            System.out.print( "Where do you go " );
            answer_10 = keyboard.next();
            
            if(answer_10.equals("recreation"))
            {
                System.out.println( "You enter the room and see strange machines." );
                System.out.println( "Dead bodies line the walls, they hang from" );
                System.out.println( "meat hooks and dry blood stains the walls" );
                System.out.println( "behind the corpses. You are disgusted by" );
                System.out.println( "the site. You turn around, about to" );
                System.out.println( "throw up, and see two doors. One door is \"red\"" );
                System.out.println( "and the other is \"blue\". Which do you go" );
                System.out.print( "through to escape the horror? " );
                answer_11 = keyboard.next();
                
                if(answer_11.equals("red"))
                {
                    System.out.println( "You go through the red door and nearly vomit" );
                    System.out.println( "at the stench. it's dark in the room. As you" );
                    System.out.println( "step forwards lights come on. The room is very" );
                    System.out.println( "large. And filled with rotten corpses of many" );
                    System.out.println( "different species. Including humans. You pass out" );
                    System.out.println( "from the sight and never wake up." );
                    System.out.println( "" );
                    System.out.println( "THE END!" );
                }
                
                else if(answer_11.equals("blue"))
                {
                    System.out.println( "You enter the room behind the blue door." );
                    System.out.println( "There is a feild of flowers." );
                    System.out.print( "Do you walk through the feild? " );
                    answer_13 = keyboard.next();
                    
                    if(answer_13.equals("no"))
                    {
                        System.out.println( "You decide not to walk through the feild." );
                        System.out.println( "Hungry badgers jump out of a cloud and attack you." );
                        System.out.println( "" );
                        System.out.println( "YOU DIE!" );
                    }
                    
                    else if(answer_13.equals("yes"))
                    {
                        System.out.println( "You walk through the feild, however you are" );
                        System.out.println( "careless with your foot placement and you trip." );
                        System.out.println( "instead of falling to the soft flowers, you fall" );
                        System.out.println( "towards the clouds. You hit the clouds with a soft" );
                        System.out.println( "landing and see a house. You enter it and and see" );
                        System.out.println( "a family of badgers. They offer you some warm tea" );
                        System.out.println( "which you accept. The tea tastes good and happy." );
                        System.out.println( "You see two ways to go, into the \"kitchen\"," );
                        System.out.println( "and \"upstairs\". Where do you go?" );
                        answer_14 = keyboard.next();
                        
                        if(answer_14.equals("kitchen"))
                        {
                            System.out.println( "you enter the kitchen and get very bored." );
                            System.out.println( "You ask the badgers if they know any games." );
                            System.out.println( "They mention that they know of one game." );
                            System.out.println( "You beg them to play it with you. The agree" );
                            System.out.println( "and take you outside. The badgers throw you" );
                            System.out.println( "off of the cloud and you hit the ground." );
                            System.out.println( "" );
                            System.out.println( "YOU DIE!" );
                        }
                        
                        else if(answer_14.equals("upstairs"))
                        {
                            System.out.println( "You go upstairs and find a bed in the middle of" );
                            System.out.println( "the room. You could \"sleep\" in the bed or you" );
                            System.out.println( "could go through the door on the \"right\". What do" );
                            System.out.print( "you do? " );
                            answer_15 = keyboard.next();
                            
                            if(answer_15.equals("right"))
                            {
                                System.out.println( "You try to go through the door, but a badger" );
                                System.out.println( "flies towards you and uses its wings to strangle" );
                                System.out.println( "you like an andaconda." );
                                System.out.println( "" );
                                System.out.println( "YOU DIED!" );
                            }
                            
                            else if(answer_15.equals("sleep"))
                            {
                                System.out.println( "You lay down in the comfy bed and fall asleep." );
                                System.out.println( "You wake up in a strange room. You look around" );
                                System.out.println( "and see the blue door that you walked through" );
                                System.out.println( "before the drug induced fairytale. You are still" );
                                System.out.println( "slightly messed up in the head. You could \"go back\"" );
                                System.out.println( "through the blue door, or climb out a \"window\" that" );
                                System.out.print( "showed up after your trance. " );
                                answer_16 = keyboard.next();
                                
                                if(answer_16.equals("go back"))
                                {
                                   System.out.println( "You go back to to the door and open it." );
                                    System.out.println( "A giant hand pulls you through the door!" );
                                    System.out.println( "" );
                                    System.out.println( "THE END!" );
                                }
                                
                                else if(answer_16.equals("window"))
                                {
                                    System.out.println( "You climb out of the window. You end up" );
                                    System.out.println( "in a butcher shop. Do you leave the building" );
                                    System.out.println( "and into the city? " );
                                    answer_17 = keyboard.next();
                                    
                                    if(answer_17.equals("no"))
                                    {
                                        System.out.println( "I guess that you'll never know" );
                                        System.out.println( "what happens." );
                                        System.out.println( "" );
                                        System.out.println( "THE END!" );
                                    }
                                    
                                    else if(answer_17.equals("yes"))
                                    {
                                        System.out.println( "You go outside and the druggy effect from" );
                                        System.out.println( "the gas in the room wears off. You see that" );
                                        System.out.println( "you are attached to some ropes and mechanisms." );
                                        System.out.println( "You're hanging upside down and blood is dripping" );
                                        System.out.println( "past your face. You're in a room with a lot of other" );
                                        System.out.println( "bodies. You hear a scream and then you're thrown into" );
                                        System.out.println( "a strange machine." );
                                        System.out.println( "" );
                                        System.out.println( "YOU DIED!" );
                                    }
                                }
                            }
                        }
                    }
                }
            }
            
            else if(answer_10.equals("cafeteria"))
            {
                System.out.println( "You enter the cafeteria. There is a large table." );
                System.out.print( "There is food on a plate. Do you eat it? " );
                answer_12 = keyboard.next();
                
                if(answer_12.equals("yes"))
                {
                    System.out.println( "You eat the food. " );
                    System.out.println( "You get sick and die of fast reacting food" );
                    System.out.println( "poison." );
                    System.out.println( "" );
                    System.out.println( "YOU DIED!" );
                }
                
                if(answer_12.equals("no"))
                {
                    System.out.println( "Well now you'll never know what happens." );
                    System.out.println( "" );
                    System.out.println( "THE END!" );
                }
            }
        }
    }
}

Picture of the output

Assignment 53